package org.bangumibuddy.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.bangumibuddy.entity.TorrentEntity;
import org.bangumibuddy.pojo.TorrentFile;

import java.util.List;

@Mapper
public interface TorrentsMapper {

    int addTorrents(List<TorrentEntity> torrentEntities);

    @Select("SELECT * FROM torrents WHERE animeId = #{id}")
    List<TorrentEntity> getTorrentsByAnimeId(Long id);

    @Select("SELECT * FROM torrents WHERE rssId = #{rssId}")
    List<TorrentEntity> getTorrentsByRssId(Long rssId);

}
